import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '@/views/LoginView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'loginView',
      component: LoginView,
    },
    {
      path: '/frame',
      name: 'FrameView',
      // 直接导入页面
      component: import('../views/FrameView.vue'),
      children: [
        {
          path: '',
          name: 'welcome',
          component: import('../views/WelcomeView.vue'),
        },
      ],
    },
  ],
})

export default router
